import requests
import json

class  IhrmLoginApi:
    @classmethod
    def login(cls,json_data):
        url = "http://ihrm-test.itheima.net/api/sys/login"
        header = {"Content-Type": "application/json"}
        resp = requests.post(url=url,headers = header,data=json.dumps(json_data))
        print(resp.json())
        return resp

if __name__ == '__main__':
    data = {"mobile": "13800000002", "password": "123456"}
    resp = IhrmLoginApi.login(json_data=data)
